package com.dycloud.project.mapper;

import com.dycloud.project.domain.MeetingReceipt;
import com.dycloud.project.dto.MeetingReceiptDTO;
import com.dycloud.project.vo.MeetingReceiptListVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MeetingReceiptMapper {
    /**
     * 查询会议回执
     *
     * @param id 会议回执主键
     * @return 会议回执
     */
    MeetingReceipt selectMeetingReceiptById(Long id);

    /**
     * 查询会议回执列表
     *
     * @param meetingReceipt 会议回执
     * @return 会议回执集合
     */
    List<MeetingReceiptListVO> selectMeetingReceiptList(MeetingReceipt meetingReceipt);

    /**
     * 新增会议回执
     *
     * @param meetingReceipt 会议回执
     * @return 结果
     */
    int insertMeetingReceipt(MeetingReceipt meetingReceipt);


    /**
     * 是否已经回执过了
     *
     * @param meetingId meetingId
     * @param userId    userId
     * @return: @return {@link MeetingReceipt }
     */

    MeetingReceipt selectUserMeetingReceipt(@Param("meetingId") Long meetingId, @Param("userId") Long userId);

    List<MeetingReceiptDTO> selectUserIsWrite(@Param("meetingIds") List<Long> meetingIds,@Param("userId") Long userId);
}